var co = require('co');
var OSS = require('ali-oss');
var client = new OSS({
    region: 'oss-cn-beijing',
    accessKeyId: 'LTAIdB0nB0JG20Hh',
    accessKeySecret: 'SY26div7MGdQUzgLLUa0i5iwnXyB1E',
    bucket: 'static-io'
});

// 上传一个文件，成功后下载这个文件
client.put('object', '/tmp/file').then(function (val) {
    console.log(val.res);
    return client.get('object');
}).then(function (val) {
    console.log(val.res);
    console.log(val.content.toString());
});